<?php

namespace App\Http\Controllers\Project;

use Illuminate\Http\Request;
use App\Http\Controllers\Common\CommonController as Controller;

class CommonController extends Controller
{
    public function error($msg = '', $url = null, $data = '', $wait = 3, array $header = [])
    {
        // if (is_null($url)) {
        //     $url = 'javascript:history.back(-1);';
        // } elseif ('' !== $url) {
        //     $url = (strpos($url, '://') || 0 === strpos($url, '/')) ? $url : Url::build($url);
        // }
        $result = [
            'code' => 404,
            'msg' => $msg,
            'data' => $data,
            'url' => $url,
            'wait' => $wait,
        ];
        $siteinfo = [];
        $siteinfo['title'] = '404-页面不存在-海螺云文档';
        $siteinfo['keywords'] = '';
        $siteinfo['description'] = '';
        $this->assign('siteinfo', $siteinfo);


        return $this->fetch('project.error.404');
    }
}
